<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button onclick="foo1()">开始计算</button>
		<script>
			function foo1()
			{
				var a,b
				result =prompt(a+b)
				if (result==a+b) {
					alert("计算正确")
				} else{
					alert("计算错误")
				}
			}
		</script>
	</body>
</html>